var div = $("div");
div.each(function(){this.foo = 'zoo';});
var pass = true;
for ( var i = 0; i &lt; div.size(); i++ ) {
  if ( div.get(i).foo != "zoo" ) pass = false;
}
ok( pass, "Execute a function, Relative" );